1. Field of the Invention
The present invention relates to a mathematical calculation method for an image-capturing device, and particularly relates to a mathematical calculation method for an image-capturing device, adapted for modeling digital images.
2. Background of the Invention
In the digital age, relevant hardware and software technology is growing and developing at a rapid rate and digital image-capturing devices are used more and more regularly in people's everyday lives, such as for digital cameras, digital video or digital products of the like.
Besides the image capturing sensors, such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS), the image quality of the digital image-capturing devices depends on the image processing chips.
The image-capturing sensor captures image signals of pixels via matrix photocells. Each photocell does not catch the three primary colors (R, G, B), but catches a single, specific color in each pixel. For example, a red filter arranged in a photocell captures a red image signal, so that each photocell has only a single image signal. The most commonly used pattern of an individual photocell on the image-capturing sensor has a red-green-red-green (RGRG) sequence in the first row and green-blue-green-blue (GBGB) sequence in the second row, for a vertical-and-horizontal alternately arrangement, illustrated in FIG. 1.
In the alternate arrangement of the three color photocells, the green color photocells are mainly processed and arranged separately by blue and red color photocells, and the image process chip calculates a digital color image for stimulating the other two colors in each pixel. For example, for resetting a green value G3′ and a blue value B3′ in a red pixel R3, the upside, the downside, the left side and the right side are arranged with green pixels (G6, G7, G8, G9); and the upper-left side, the lower-left side, the upper-right side and the lower-right side are arranged with blue pixels (B18, B19, B20, B21). Therefore, an average green value, which is obtained by estimating from the adjacent green pixels (G6, G7, G8, G9) surrounding the red pixel, and an average blue value, which is obtained by estimating from the adjacent blue pixels (B18, B19, B20, B21) surrounding the red pixel, are the green value G3′ and the blue value B3′ matching the red pixel.
According to the conventional method of calculating a digital image, the quantity of photocells can be reduced, the volume of the image-capturing devices can be shrunk, so that costs can be lowered. However, due to the estimating of color values, weird points may occur on the edge of the image contour, particularly when a large color contrast occurs, the sharp teeth edge of the image contour or the vague image may come about. This kind of shortcoming cannot be overcome if the conventional method of the mathematical calculation is used. Thus, a new method of mathematical calculation will be provided to overcome the shortcomings mentioned above and further increase the processing speed of an image-processing chip.